3.51 \(\int \cot ^4(c+d x) (a+a \sec (c+d x))^3 \, dx\)

Optimal. Leaf size=69 \[ -\frac {4 a^3 \cot ^3(c+d x)}{3 d}+\frac {a^3 \cot (c+d x)}{d}-\frac {4 a^3 \csc ^3(c+d x)}{3 d}+\frac {3 a^3 \csc (c+d x)}{d}+a^3 x \]

[Out]

a^3*x+a^3*cot(d*x+c)/d-4/3*a^3*cot(d*x+c)^3/d+3*a^3*csc(d*x+c)/d-4/3*a^3*csc(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3886, 3473, 8, 2606, 2607, 30} \[ -\frac {4 a^3 \cot ^3(c+d x)}{3 d}+\frac {a^3 \cot (c+d x)}{d}-\frac {4 a^3 \csc ^3(c+d x)}{3 d}+\frac {3 a^3 \csc (c+d x)}{d}+a^3 x \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^4*(a + a*Sec[c + d*x])^3,x]

[Out]

a^3*x + (a^3*Cot[c + d*x])/d - (4*a^3*Cot[c + d*x]^3)/(3*d) + (3*a^3*Csc[c + d*x])/d - (4*a^3*Csc[c + d*x]^3)/
(3*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 3886

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Int[ExpandI
ntegrand[(e*Cot[c + d*x])^m, (a + b*Csc[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[n, 0]

Rubi steps

\begin {align*} \int \cot ^4(c+d x) (a+a \sec (c+d x))^3 \, dx &=\int \left (a^3 \cot ^4(c+d x)+3 a^3 \cot ^3(c+d x) \csc (c+d x)+3 a^3 \cot ^2(c+d x) \csc ^2(c+d x)+a^3 \cot (c+d x) \csc ^3(c+d x)\right ) \, dx\\ &=a^3 \int \cot ^4(c+d x) \, dx+a^3 \int \cot (c+d x) \csc ^3(c+d x) \, dx+\left (3 a^3\right ) \int \cot ^3(c+d x) \csc (c+d x) \, dx+\left (3 a^3\right ) \int \cot ^2(c+d x) \csc ^2(c+d x) \, dx\\ &=-\frac {a^3 \cot ^3(c+d x)}{3 d}-a^3 \int \cot ^2(c+d x) \, dx-\frac {a^3 \operatorname {Subst}\left (\int x^2 \, dx,x,\csc (c+d x)\right )}{d}+\frac {\left (3 a^3\right ) \operatorname {Subst}\left (\int x^2 \, dx,x,-\cot (c+d x)\right )}{d}-\frac {\left (3 a^3\right ) \operatorname {Subst}\left (\int \left (-1+x^2\right ) \, dx,x,\csc (c+d x)\right )}{d}\\ &=\frac {a^3 \cot (c+d x)}{d}-\frac {4 a^3 \cot ^3(c+d x)}{3 d}+\frac {3 a^3 \csc (c+d x)}{d}-\frac {4 a^3 \csc ^3(c+d x)}{3 d}+a^3 \int 1 \, dx\\ &=a^3 x+\frac {a^3 \cot (c+d x)}{d}-\frac {4 a^3 \cot ^3(c+d x)}{3 d}+\frac {3 a^3 \csc (c+d x)}{d}-\frac {4 a^3 \csc ^3(c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.24, size = 112, normalized size = 1.62 \[ \frac {a^3 \csc \left (\frac {c}{2}\right ) \csc ^3\left (\frac {1}{2} (c+d x)\right ) \left (-18 \sin \left (c+\frac {d x}{2}\right )+14 \sin \left (c+\frac {3 d x}{2}\right )-9 d x \cos \left (c+\frac {d x}{2}\right )-3 d x \cos \left (c+\frac {3 d x}{2}\right )+3 d x \cos \left (2 c+\frac {3 d x}{2}\right )-24 \sin \left (\frac {d x}{2}\right )+9 d x \cos \left (\frac {d x}{2}\right )\right )}{24 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^4*(a + a*Sec[c + d*x])^3,x]

[Out]

(a^3*Csc[c/2]*Csc[(c + d*x)/2]^3*(9*d*x*Cos[(d*x)/2] - 9*d*x*Cos[c + (d*x)/2] - 3*d*x*Cos[c + (3*d*x)/2] + 3*d
*x*Cos[2*c + (3*d*x)/2] - 24*Sin[(d*x)/2] - 18*Sin[c + (d*x)/2] + 14*Sin[c + (3*d*x)/2]))/(24*d)

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 82, normalized size = 1.19 \[ \frac {7 \, a^{3} \cos \left (d x + c\right )^{2} + 2 \, a^{3} \cos \left (d x + c\right ) - 5 \, a^{3} + 3 \, {\left (a^{3} d x \cos \left (d x + c\right ) - a^{3} d x\right )} \sin \left (d x + c\right )}{3 \, {\left (d \cos \left (d x + c\right ) - d\right )} \sin \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^4*(a+a*sec(d*x+c))^3,x, algorithm="fricas")

[Out]

1/3*(7*a^3*cos(d*x + c)^2 + 2*a^3*cos(d*x + c) - 5*a^3 + 3*(a^3*d*x*cos(d*x + c) - a^3*d*x)*sin(d*x + c))/((d*
cos(d*x + c) - d)*sin(d*x + c))

________________________________________________________________________________________

giac [A]  time = 0.32, size = 50, normalized size = 0.72 \[ \frac {3 \, {\left (d x + c\right )} a^{3} + \frac {6 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^4*(a+a*sec(d*x+c))^3,x, algorithm="giac")

[Out]

1/3*(3*(d*x + c)*a^3 + (6*a^3*tan(1/2*d*x + 1/2*c)^2 - a^3)/tan(1/2*d*x + 1/2*c)^3)/d

________________________________________________________________________________________

maple [A]  time = 0.85, size = 125, normalized size = 1.81 \[ \frac {a^{3} \left (-\frac {\left (\cot ^{3}\left (d x +c \right )\right )}{3}+\cot \left (d x +c \right )+d x +c \right )+3 a^{3} \left (-\frac {\cos ^{4}\left (d x +c \right )}{3 \sin \left (d x +c \right )^{3}}+\frac {\cos ^{4}\left (d x +c \right )}{3 \sin \left (d x +c \right )}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}\right )-\frac {a^{3} \left (\cos ^{3}\left (d x +c \right )\right )}{\sin \left (d x +c \right )^{3}}-\frac {a^{3}}{3 \sin \left (d x +c \right )^{3}}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^4*(a+a*sec(d*x+c))^3,x)

[Out]

1/d*(a^3*(-1/3*cot(d*x+c)^3+cot(d*x+c)+d*x+c)+3*a^3*(-1/3/sin(d*x+c)^3*cos(d*x+c)^4+1/3/sin(d*x+c)*cos(d*x+c)^
4+1/3*(2+cos(d*x+c)^2)*sin(d*x+c))-a^3/sin(d*x+c)^3*cos(d*x+c)^3-1/3*a^3/sin(d*x+c)^3)

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 90, normalized size = 1.30 \[ \frac {{\left (3 \, d x + 3 \, c + \frac {3 \, \tan \left (d x + c\right )^{2} - 1}{\tan \left (d x + c\right )^{3}}\right )} a^{3} + \frac {3 \, {\left (3 \, \sin \left (d x + c\right )^{2} - 1\right )} a^{3}}{\sin \left (d x + c\right )^{3}} - \frac {a^{3}}{\sin \left (d x + c\right )^{3}} - \frac {3 \, a^{3}}{\tan \left (d x + c\right )^{3}}}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^4*(a+a*sec(d*x+c))^3,x, algorithm="maxima")

[Out]

1/3*((3*d*x + 3*c + (3*tan(d*x + c)^2 - 1)/tan(d*x + c)^3)*a^3 + 3*(3*sin(d*x + c)^2 - 1)*a^3/sin(d*x + c)^3 -
 a^3/sin(d*x + c)^3 - 3*a^3/tan(d*x + c)^3)/d

________________________________________________________________________________________

mupad [B]  time = 1.20, size = 39, normalized size = 0.57 \[ a^3\,x+\frac {a^3\,\left (6\,\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\right )}{3\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)^4*(a + a/cos(c + d*x))^3,x)

[Out]

a^3*x + (a^3*(6*cot(c/2 + (d*x)/2) - cot(c/2 + (d*x)/2)^3))/(3*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a^{3} \left (\int 3 \cot ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 3 \cot ^{4}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \cot ^{4}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int \cot ^{4}{\left (c + d x \right )}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**4*(a+a*sec(d*x+c))**3,x)

[Out]

a**3*(Integral(3*cot(c + d*x)**4*sec(c + d*x), x) + Integral(3*cot(c + d*x)**4*sec(c + d*x)**2, x) + Integral(
cot(c + d*x)**4*sec(c + d*x)**3, x) + Integral(cot(c + d*x)**4, x))

________________________________________________________________________________________